using System;
using System.Collections.Generic;
using System.Text;
using System.Diagnostics;

namespace Yorrick.FlickrMetadataSynchr.Log
{
   /// <summary>
   /// An activity item that was logged.
   /// </summary>
   public class ActivityItem
   {
      #region Private fields
      /// <summary>
      /// The date and time at which the activity occurred.
      /// </summary>
      private DateTime _occurredAt;

      /// <summary>
      /// The type of message.
      /// </summary>
      private TraceEventType _messageType;

      /// <summary>
      /// The message.
      /// </summary>
      private string _message;
      #endregion

      #region Public properties
      /// <summary>
      /// Gets the date and time at which the activity occurred.
      /// </summary>
      public DateTime OccurredAt
      {
         get { return _occurredAt; }
      }

      /// <summary>
      /// Gets the message.
      /// </summary>
      public string Message
      {
         get { return _message; }
      }

      /// <summary>
      /// Gets the type of message.
      /// </summary>
      public TraceEventType MessageType
      {
         get { return _messageType; }
      }
      #endregion

      #region Constructor
      /// <summary>
      /// Constructs an <see cref="ActivityItem"/> that occurs now.
      /// </summary>
      /// <param name="message">The message.</param>
      /// <param name="messageType">The type of message.</param>
      public ActivityItem(string message, TraceEventType messageType)
      {
         _occurredAt = DateTime.Now;

         _message = message;

         _messageType = messageType;
      }
      #endregion
   }
}
